<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style type="text/css">
        #div1,#div2,#div3{
            width: 100px;
            height: 100px;
            background-color: yellow;
            border: 1px solid black;
        }
        #main{
            border: solid 1px red;
        }
        #div1{
            float: right;
        }
        #div2,#div3{
            float: left;
        }
    </style>
</head>
<body>
<div id="main">
     <div id="div1">div1</div>
     <div id="div2">div2</div>
     <div id="div3">div3</div>
</div>
</body>
</html>